<template>
    <Empty v-if="!questionList || questionList.length == 0"></Empty>
    <view class="container">
        <view class="item" v-for="(item, index) in questionList" :key="index">
            <WrittenCard v-for="(item, index) in questionList" :key="index" :item="item"></WrittenCard>
        </view>
    </view>
</template>
<script setup lang="ts">
import Empty from '@/components/Empty.vue';
import type { QuestionItem } from '@/type/question'
import { ref } from 'vue';
import WrittenCard from '@/components/WrittenCard.vue';
import { onLoad } from '@dcloudio/uni-app';
import { useUserStore } from '@/store';
import type { ArticleItem } from '@/type/article';
import { API_getMistakeCollection } from '@/service/home';
const userStore = useUserStore();
const questionList = ref<QuestionItem[]>([]);
const getLikeRecord = async () => {
    let res = await API_getMistakeCollection();
    questionList.value = res.data;
}
onLoad(() => {
    getLikeRecord();
})
</script>
<style scoped lang="scss">
.container {

    padding: 20rpx;

    .title {
        font-size: 30rpx;
        color: #333;
        margin: 20rpx;
    }
}
</style>
